﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="R04.aspx.vb" Inherits="R04" %>

<%@ Register Assembly="ISNet.WebUI.WebTreeView" Namespace="ISNet.WebUI.WebTreeView" TagPrefix="ISWebTreeView" %>



<%@ Register Assembly="ISNet.WebUI.WebCombo" Namespace="ISNet.WebUI.WebCombo" TagPrefix="ISWebCombo" %>

<%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop" TagPrefix="ISWebDesktop" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script>
        function openpop() {
            var params = [
        'height=' + (screen.height - 20),
        'width=' + screen.width,
        'fullscreen=yes',
        'resizeable=yes'
            ].join(',');

            var popup = window.open('./Report/RP04.aspx', 'popup_window', params);
            popup.moveTo(0, 0);
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="js/magicsuggest-1.2.6.css" rel="stylesheet" />
    <script src="js/magicsuggest-1.2.6.js"></script>
    <script src="script/packed.js"></script>
    <script src="script/tinybox.js"></script>
    <link href="script/style.css" rel="stylesheet" />
    <script type="text/javascript" src="js/JSON.js"></script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <br />
    <div style="margin-left: 10px; padding: 10px 10px 10px 10px;">
        <div style="float: left; width: 97%; border: solid; border-color: gray; border-width: 1px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; text-align: right; padding: 5px 5px 5px 5px;">
            <div style="text-align: right; margin-top: 5px;">
                <div align="left" style="width: 600px; float: left">
                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                </div>

                ปี&nbsp;
            <asp:TextBox ID="PlanYearsTxt" runat="server" Width="50px" Enabled="false" Style="text-align: center" MaxLength="4"></asp:TextBox>
                &nbsp;&nbsp;&nbsp;&nbsp;
            
            </div>
        </div>
        <div>
            <div id="div1" runat="server" style="float: left; width: 40%; border: solid; border-color: gray; border-width: 1px; margin-right: 10px; margin-top: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; height: 110px;">

                <div style="padding-bottom: 5px;"><strong>&nbsp;ครุภัณฑ์</strong></div>
                <table>
                    <tr>
                        <td>&nbsp; &nbsp;</td>
                        <td>
                            <asp:Label ID="Label3" runat="server" Text="ประเภทครุภัณฑ์"></asp:Label>
                        </td>
                        <td>

                            <ISWebCombo:WebCombo ID="AssetGroupCombo" runat="server" UseDefaultStyle="true" DataTextField="Description" DataValueField="AssetGroup" OnInitializeDataSource="AssetGroup_InitializeDataSource" AllowWildCardSearch="true">
                                <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" EntryMode="AutoComplete">
                                </LayoutSettings>
                            </ISWebCombo:WebCombo>

                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text="ครุภัณฑ์ ตั้งแต่"></asp:Label></td>
                        <td>
                            <ISWebCombo:WebCombo ID="WebCombo1" Width="300px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ActivityTypeCode" Height="20px" OnInitializeDataSource="WebCombo1_InitializeDataSource" AllowWildCardSearch="true">
                                <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false">
                                    <TextSettings ParentEmptyPromptText="กรุณาเลือกประเภทครุภัณฑ์" />
                                </LayoutSettings>
                                <LinkSettings Enabled="True" ParentWebComboID="AssetGroupCombo" />
                            </ISWebCombo:WebCombo>
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            <asp:Label ID="Label4" runat="server" Text="ถึง"></asp:Label></td>
                        <td>
                            <ISWebCombo:WebCombo ID="WebCombo2" Width="300px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="ActivityTypeCode" Height="20px" OnInitializeDataSource="WebCombo1_InitializeDataSource" AllowWildCardSearch="true">
                                <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false">
                                    <TextSettings ParentEmptyPromptText="กรุณาเลือกประเภทครุภัณฑ์" />
                                </LayoutSettings>
                                <LinkSettings Enabled="True" ParentWebComboID="AssetGroupCombo" />
                            </ISWebCombo:WebCombo>
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                    </tr>
                </table>

            </div>

            <div id="div2" runat="server" style="float: right; width: 55%; border: solid; border-color: gray; border-width: 1px; margin-right: 30px; margin-top: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; height: 110px;">
                &nbsp;
                <strong>หรือ</strong>
                <div style="margin: 5px 5px 5px 5px;">
                    <asp:HiddenField runat="server" ID="hdf1" />
                    <asp:ListBox ID="ms8" runat="server" Width="97%" SelectionMode="Multiple"></asp:ListBox><br />
                </div>
                <script type="text/javascript">
                    $(document).ready(function () {

                        var ms7 = $('#<%= ms8.ClientID%>').magicSuggest({
                            // will fetch data from options
                        });

                        clickedx = function () {

                            $("#<%= hdf1.ClientId %>").val(ms7.getValue());
                        }
                    });
                </script>
            </div>
            <div style="float: left; width: 97%; border: solid; border-color: gray; border-width: 1px; margin-top: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; padding: 5px 5px 5px 5px;">

                <div align="right">
                    <asp:ImageButton ID="toReport" runat="server" ImageUrl="~/Icons/viewreport.png" OnClientClick="clickedx()" />
                </div>

            </div>
        </div>
    </div>
    <br />
    <br />




    <%=ScriptText%>
</asp:Content>

